package sprites;

import com.golden.gamedev.object.Timer;

import engine.TowerDefense;
import sprites.GreenBullet;

/**
 * The cheapest tower.
 * 
 * @author Alex Lee (hl69)
 */
public class WeakTower extends Tower
{

	public WeakTower(TowerDefense owner, double x, double y)
	{
		super(owner, owner.getImages("resources/weaktower.png", 1, 1), x, y);

		hitpoints = 200;
		firingRate = new Timer(1000);
		range = INFINITE_RANGE;
	}

	public void update(long elapsedTime)
	{
		super.update(elapsedTime);

		if(firingRate.action(elapsedTime) && firing)
		{
			Projectile p = new GreenBullet(myOwner, getX()+60, getY()+60);
			myOwner.TOWER_P.add(p);
		}
	}

}
